package com.yl.chainStore.mapper.warehouse;

import com.yl.chainStore.entity.warehouse.WarehouseProfitLossOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page
import com.yl.chainStore.common.enums.Status
import com.yl.chainStore.pojo.vo.warehouse.WarehouseProfitLossOrderSelectVo
import org.apache.ibatis.annotations.Mapper
import org.apache.ibatis.annotations.Param

/**
 * <p>
 * 仓库损益单 Mapper 接口
 * </p>
 *
 * @author cxw
 * @since 2021-07-22
 */
@Mapper
interface WarehouseProfitLossOrderMapper : BaseMapper<WarehouseProfitLossOrder>{

	fun getOrderPage(@Param("page")page:Page<WarehouseProfitLossOrder>,
						@Param("vo")vo:WarehouseProfitLossOrderSelectVo,
                     @Param("stagingStatus")status: Status
	):Page<WarehouseProfitLossOrder>


	/**
	 * 某人，某个部门的暂存损益单
	 */
	fun getUserStagingOrder(@Param("userId")userId:Long,
	                           @Param("warehouseId")warehouseId:Long,
	                           @Param("status")status: Status
	):List<WarehouseProfitLossOrder>
}
